package net.sppan.blog.controller.stats;

import net.sppan.blog.annotation.RequiresPermissions;
import net.sppan.blog.controller.BaseController;
import net.sppan.blog.job.ClickStatsJob;
import org.apache.commons.lang.StringUtils;

@RequiresPermissions
public class StatsController extends BaseController {

    @RequiresPermissions(key = "stats:fix")
    public void fix() {
        String data_day = getPara("data_day");
        if (!StringUtils.isBlank(data_day)) {
            ClickStatsJob.fixData(data_day);
            renderJson(true, "execute fix action");
            return;
        }
        renderJson(false, "data_day must not be null");

    }

}
